﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common.Service;
using System.Data;
using System.Text;

namespace Task
{
    public partial class NewTask : System.Web.UI.Page
    {
        public string ContentProcessType = "";
        Task.Common.Interface.IDictionary dictionary = ServiceContainer.GetService<Task.Common.Interface.IDictionary>();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GetProcessType();
            }
        }
        public void GetProcessType()
        {
            StringBuilder sb = new StringBuilder();
            string where = "type!PROCESS_CATEGORY;";
            DataTable dt = dictionary.GetDictionaryData("DictionaryLogic_GetListByType", where).Tables[0];
            sb.Append("<li class='' id='processCatalog'><a href='#' id='pc0' onclick='SetProcessType(0)'>所有</a></li>");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string CN_NAME = dt.Rows[i]["CN_NAME"].ToString().Trim();
                string DICTIONARY_ID = dt.Rows[i]["DICTIONARY_ID"].ToString().Trim();

                sb.Append("<li class='' id='processCatalog'><a id='pc" + DICTIONARY_ID + "' onclick='SetProcessType(" + DICTIONARY_ID + ")' href='#')>" + CN_NAME + "</a></li>");
            }
            ContentProcessType = sb.ToString();
        }

    }
}